﻿using Xamarin.Forms;
using Xamarin.Forms.PlatformConfiguration.AndroidSpecific;
using Xamarin.Forms.Xaml;
using Xarmarin.GoldFinger.Engine.Core;
using Xarmarin.GoldFinger.Engine.Time;

namespace Xarmarin.GoldFinger.Views
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class MainPage : Xamarin.Forms.TabbedPage
    {
        public MainPage()
        {
            InitializeComponent();
            //初始化时间计时器
            new TimeEngine().InitTimer();
            //绑定角色
            Services.SubjectDataStore.BindCurrentSub();
            this.Children.Add(SinglePageManager.SubMainPage);
            this.Children.Add(SinglePageManager.AbodeIndexPage);
            this.Children.Add(SinglePageManager.WorldIndexPage);
            this.Children.Add(SinglePageManager.ItemsPage);
            Title = KzContext.CurrSub;
            NavigationPage.SetHasNavigationBar(this, false);
            //菜单下置
            On<Xamarin.Forms.PlatformConfiguration.Android>().SetToolbarPlacement(ToolbarPlacement.Bottom);
        }
    }
}